﻿
@{
    ViewBag.Title = "ViewChargeMoneyDetail";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="gridPanel">
    <table id="gridList"></table>
    <div id="gridPager"></div>
</div>

<script lang="javascript">
    var year = $.request("year");
    var siteId = $.request("siteId");
    var month = $.request("month");
    var dlcode = $.request("dlcode");
    var type = $.request("type");
    var $gridList = $("#gridList");

    $(function () {
        gridList();
    });

    //get data
    function gridList() {
        $gridList.dataGrid({
            url: "/SiteManage/SiteStatistics/GetMoneyDetailGridJson",
            height: window.$(window).height() - 45,
            postData: getSearchData(),
            colModel: [
                { label: "主键", name: "sfxmCode", hidden: true, key: true },
                { label: '患者名称', name: 'xm', width: 100, align: 'left' },
                { label: '收费项目名称', name: 'sfxmmc', width: 180, align: 'left' },
                {
                    label: '单价', name: 'dj', width: 90, align: 'left',
                    formatter: 'currency', formatoptions: { decimalPlaces: 2 }
                },
                {
                    label: '数量', name: 'sl', width: 90, align: 'left',
                    formatter: 'currency', formatoptions: { decimalPlaces: 2 }
                },
                {
                    label: '结算总额', name: 'zje', width: 120, align: 'left',
                    formatter: 'currency', formatoptions: { decimalPlaces: 2 }
                }
            ],
            viewrecords: true,
            unwritten: false
        });
    }

    function getSearchData() {
        return { year: year, siteId: siteId, month: month, dlcode: dlcode, type: type };
    }
</script>
